﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class geren_information : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        DataClassesDataContext a1 = new DataClassesDataContext();
        int? i;
        i = a1.login((String)Session["phone"],(String)Session["phone"],(String)Session["psw"]);
        if (i == 1)
        {
        }
        else
        {
            Response.Write("<script>alert('请先登录！');location='homepage.aspx'</script>");
            //Response.Redirect("homepage.aspx");
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {

    }

    protected void Button1_Click1(object sender, EventArgs e)
    {
        string w1 = (DetailsView1.FindControl("TextBox6") as TextBox).Text;
        string w2 = (DetailsView1.FindControl("TextBox7") as TextBox).Text;
        string w3 = (DetailsView1.FindControl("TextBox8") as TextBox).Text;
        string w4 = (DetailsView1.FindControl("TextBox9") as TextBox).Text;
        string w5 = (DetailsView1.FindControl("TextBox10") as TextBox).Text;
        DataClassesDataContext a1 = new DataClassesDataContext();
        a1.update_user(w1,w2,w3,w4,w5);
        Response.Write("<script>alert('信息已更新！');location='geren_information.aspx'</script>");
    }
    protected void DetailsView1_PageIndexChanging(object sender, DetailsViewPageEventArgs e)
    {

    }
}
